//
//  EventDetailBaseCell2.m
//  ConvenientlyTake
//
//  Created by 森鑫 on 2022/12/22.
//

#import "EventDetailBaseCell2.h"
#import "EventDetailModel.h"

@implementation EventDetailBaseCell2

- (void)awakeFromNib {
    [super awakeFromNib];
    self.rightLabel.layer.cornerRadius = 2;
    self.rightLabel.layer.borderColor = RGBA(0, 180, 42, 1).CGColor;
    self.rightLabel.layer.borderWidth = 1;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    // Configure the view for the selected state
}

-(void)fillDataWith:(EventDetailModel *)model andTitleString:(NSString *)titleString{
    self.model = model;
    self.descLabel.text = titleString;
    if ([titleString isEqualToString:@"发起人"]) {
        self.contentLabel.text = R(model.promoterName);
        if (model.promoterTypeName) {
            self.rightLabel.text = [NSString stringWithFormat:@" %@ ", model.promoterTypeName];
//            self.rightLabel.hidden = NO;
//            if ([model.promoterTypeName containsString:@"调查组"]) {
//                self.rightLabel.text = [NSString stringWithFormat:@" %@ ", model.promoterTypeName];
//            } else {
//                self.rightLabel.text = [NSString stringWithFormat:@" %@调查组 ", model.promoterTypeName];
//            }
        } else {
            self.rightLabel.hidden = YES;
        }
    }
}

@end
